package com.flurry.android;

import android.util.Log;
import com.flurry.android.caching.ObjectData;
import org.json.JSONException;
import org.json.JSONObject;

final class go
  implements Runnable
{
  private AppCloudResponseHandler cP = null;
  private ObjectData gr = null;

  public go(ObjectData paramObjectData, AppCloudResponseHandler paramAppCloudResponseHandler)
  {
    this.gr = paramObjectData;
    this.cP = paramAppCloudResponseHandler;
  }

  public final void run()
  {
    ObjectData localObjectData;
    if (FlurryAppCloud.D().getPendingData().x(this.gr.getId()))
      localObjectData = FlurryAppCloud.D().getPendingData().getObjectById(this.gr.getId());
    while (true)
      if (localObjectData != null)
      {
        Log.i("CacheObjectManager", "Object marked to be deleted");
        FlurryAppCloud.D().getPendingData().a(this.gr);
        try
        {
          AppCloudResponse localAppCloudResponse = new AppCloudResponse(new JSONObject("{code:\"200\",note:\"Deleted from local cache.\"}"));
          this.cP.handleResponse(localAppCloudResponse);
          AppCloudSearch.onMakeSearchNotValidForCollection(this.gr.getCollectionName());
          FlurryAppCloud.D().registerDirtyObject(this.gr.getId(), this.cP, 2);
          return;
          boolean bool = FlurryAppCloud.D().getServerData().x(this.gr.getId());
          localObjectData = null;
          if (bool)
            localObjectData = FlurryAppCloud.D().getServerData().getObjectById(this.gr.getId());
        }
        catch (JSONException localJSONException)
        {
          while (true)
            localJSONException.printStackTrace();
        }
        catch (Exception localException2)
        {
          while (true)
            localException2.printStackTrace();
        }
      }
    try
    {
      this.cP.handleResponse(null);
      return;
    }
    catch (Exception localException1)
    {
      localException1.printStackTrace();
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.go
 * JD-Core Version:    0.6.2
 */